home *** CD-ROM | disk | FTP | other *** search
-
- //------------------------------------------------------------------>
- // Spikes-1.Pov - A few groups of random spikes.
- //
- // Free demonstration file by: Paul T. Dawson.
- // ptdawson@voicenet.com
- //
- // For the magnificent raytracer, POV-Ray 3.0 (Thank You, POV-Team!).
- //
- // This scene uses the new POV-Ray 3.0 beta 6 "rand" function.
-
- //------------------------------------------------------------------>
- // Standard settings and include files.
-
- #version 3.0
- global_settings { assumed_gamma 2.2 }
-
- #include "colors.inc"
- #include "textures.inc"
- #include "glass.inc"
- #include "golds.inc"
- #include "skies.inc"
-
- //------------------------------------------------------------------>
- // Set up the camera and (too many?) lights.
-
- camera { location < 0, 0, -35 > look_at < 0, 0, 0 > }
-
- light_source { < -99, 99, 0 > color White }
- light_source { < 0, 99, -99 > color White }
- light_source { < 99, 99, 0 > color White }
- light_source { < 0, -9, -99 > color White }
-
- //------------------------------------------------------------------>
- // Put in a fantastic sky (POV-Team did all the work!).
-
- sky_sphere { S_Cloud1 }
-
- //------------------------------------------------------------------>
- // Add a relatively simple floor. The glass floor is semi-transparent,
- // so the white sub-floor brightens it up a little.
-
- cylinder { <0, -21, 0 > < 0, -22, 0 >, 9999
- texture { T_Green_Glass }
- normal { bumps 3 scale 3 } }
-
- cylinder { <0, -31, 0 > < 0, -32, 0 >, 9999
- pigment { White } }
-
- //------------------------------------------------------------------>
- // Start the pseudo-random number sequence. The random numbers are
- // used to rotate the cones.
-
- #declare R1 = seed(1)
-
- //------------------------------------------------------------------>
- // Create the Spike object.
-
- #declare Number_Of_Cones = 300
-
- #declare Spike = union {
-
- #declare LOOP = 0
- #while ( LOOP < Number_Of_Cones )
-
- // Get the random numbers for rotating this cone.
- #declare X1 = rand ( R1 ) * 359
- #declare Y1 = rand ( R1 ) * 359
- #declare Z1 = rand ( R1 ) * 359
-
- // These lines are for checking the random numbers.
- // Un-comment them if you're really curious!
- //#debug concat(" X1 =",str(X1,8,3))
- //#debug concat(" - Y1 =",str(Y1,8,3))
- //#debug concat(" - Z1 =",str(Z1,8,3),"\n")
-
- cone { < 0, 0, 0 >, 1 < 0, 12, 0 >, 0
- rotate < X1, Y1, Z1 >
- } // End of cone.
-
- #declare LOOP = LOOP + 1
- #end
-
- finish { Shiny }
-
- } // End of union.
-
- //------------------------------------------------------------------>
- // Show one big Spike object in the center.
-
- object { Spike
-
- pigment { White }
-
- // Move it down a little.
- translate y * -1
-
- } // End of object.
-
- //------------------------------------------------------------------>
- // Now show twelve little ones orbiting around the center.
-
- #declare Color_Flag = 1
-
- #declare LOOP = 0
- #while ( LOOP < 360 )
-
- object { Spike scale 0.3
-
- // Rotate it before you move it.
- rotate < rand(R1), rand(R1), rand(R1) >
-
- // Move over to prepare for y rotation.
- translate x * 16
-
- // Swing it around in a flat circle. Add 15 to
- // shift everything around a little.
- rotate y * -1 * ( LOOP + 15 )
-
- // This tilts the set towards the camera.
- rotate x * -55
-
- // Move it up a little.
- translate y * 4
-
- // The orbiting groups are done in twelve colors.
- // This jumble of statements controls the colors!
-
- // Yes, there's a simpler way to do this, but
- // this way is slightly easier for humans to read!
-
- #if ( Color_Flag = 1 )
- pigment { color rgb < 0.5, 0, 1 > } #end
- #if ( Color_Flag = 2 )
- pigment { color rgb < 0, 0, 1 > } #end
- #if ( Color_Flag = 3 )
- pigment { color rgb < 0, 0.5, 1 > } #end
- #if ( Color_Flag = 4 )
- pigment { color rgb < 0, 1, 1 > } #end
- #if ( Color_Flag = 5 )
- pigment { color rgb < 0, 1, 0.5 > } #end
- #if ( Color_Flag = 6 )
- pigment { color rgb < 0, 1, 0 > } #end
- #if ( Color_Flag = 7 )
- pigment { color rgb < 0.5, 1, 0 > } #end
- #if ( Color_Flag = 8 )
- pigment { color rgb < 1, 1, 0 > } #end
- #if ( Color_Flag = 9 )
- pigment { color rgb < 1, 0.5, 0 > } #end
- #if ( Color_Flag = 10 )
- pigment { color rgb < 1, 0, 0 > } #end
- #if ( Color_Flag = 11 )
- pigment { color rgb < 1, 0, 0.5 > } #end
- #if ( Color_Flag = 12 )
- pigment { color rgb < 1, 0, 1 > } #end
-
- #declare Color_Flag = Color_Flag + 1
-
- } // End of object.
-
- #declare LOOP = LOOP + 30
- #end
-
- //------------------------------------------------------------------>
- // End of this file.
-
-